package com.gk.mapper;

import com.gk.model.StudentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ClassMapper {
    @Select("select * from c_class c join s_student s on s.cid = c.id where s.cid =#{id}")
    List<StudentInfo> selectStudentInfo(Integer id);

    @Select("select * from s_student where id = #{id}")
    List<StudentInfo> selectStudentInfo1(Integer id);

    @Update("update s_student set name = #{name},age = #{age} where id = #{id}")
    Integer updateInfo(StudentInfo studentInfo);

}
